<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">    
    <link rel="shortcut icon" href="<?php echo base_url('themes/front/ico/favicon.ico');?>">

    <title><?php echo $layout_title; ?></title>
    <meta name="description" content="<?php echo $meta_desc; ?>"/>
    <meta name="author" content="Satu Tujuan">   
    
    <!-- Bootstrap core CSS -->
    <link href="<?php echo base_url('themes/front/css/bootstrap.css') ?>" rel="stylesheet">
    <link href="<?php echo base_url('themes/front/css/carousel.css') ?>" rel="stylesheet">
    <link href="<?php echo base_url('themes/front/css/custom-st.css') ?>" rel="stylesheet">

    <!-- font awesome -->
    <link type="text/css" rel="stylesheet" href="asset/fonts/fontawesome/css/font-awesome.css" />

    <?php if(isset($layout_includes['css']) AND count($layout_includes['css']) > 0): ?>
	  <?php foreach($layout_includes['css'] as $css): ?>
    <!-- additional css -->
		<link rel="stylesheet" href="<?php echo $css['file']; ?>"<?php echo ($css['options'] === NULL ? '' : ' media="' . $css['options'] . '"'); ?>>
    <?php endforeach; ?>
    <?php endif; ?>

    <?php if(isset($layout_includes['js']) AND count($layout_includes['js']) > 0): ?>
		<?php foreach($layout_includes['js'] as $js): ?>
    <?php if($js['options'] !== NULL AND $js['options'] == 'header'): ?>
    <!-- additional javascript -->
    <script src="<?php echo $js['file']; ?>"></script>
    <?php endif; ?>
    <?php endforeach; ?>
    <?php endif; ?>
  <body>
  <!-- Modal -->
    <div class="modal fade bs-example-modal-sm" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-sm">
        <div class="modal-content">
          <?php echo form_open('login', array('role' => 'form', 'id' => 'formLogin','class' => 'form-horizontal'));?>
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
              <h4 class="modal-title" id="myModalLabel">Login Member</h4>
            </div>
            <div class="modal-body">
              <div class="form-group">
                <label class="col-sm-3 control-label">ID</label>
                <div class="col-sm-9">
                  <input type="text" name="username" class="form-control input-sm" placeholder="ID Member">
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-3 control-label">Password</label>
                <div class="col-sm-9">
                  <input type="password" name="password" class="form-control input-sm" id="inputPassword3" placeholder="Password">
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-3 control-label">Sebagai</label>
                <div class="col-sm-9">
                  <select name="kategori" class="form-control input-sm">
                    <option>Pengemudi</option>
                    <option>Penumpang</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="modal-footer">
              <span style="float: left; padding-top: 5px;">
                <a href="#" data-toggle="modal" data-target="#emailModal">Lupa kata sandi ?</a>
              </span>
              <button type="submit" onClick="validate()" class="btn btn-primary">Masuk</button>
            </div>
          <?php echo form_close();?>
        </div>
      </div>
    </div>
  <!-- End Modal -->
  <!-- Fixed navbar -->
    <div class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="row">
          <div class="col-lg-10 col-lg-offset-1">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              <div class="logo">
                <a href="<?php echo site_url(); ?>"><img src="<?php echo base_url('themes/front/img/logo.png'); ?>"></a>
              </div>
            </div>
            <div class="navbar-collapse collapse">
              <ul class="nav navbar-nav navbar-right">
                <li><a href="<?php echo site_url('daftar') ?>">Daftar</a></li>
                <li><a href="#">Cari Pengendara</a></li>
                <!-- <li><a href="#">Cari Penumpang</a></li> -->
                <li><a href="<?php echo site_url('semua-pengalaman') ?>">Pengalaman Anda</a></li>
                <li><a href="<?php echo site_url('konten/tentang-satutujuan-co-id') ?>">Tentang Satutujuan.co.id</a></li>
                <li><a href="#">Kontak</a></li>
                <?php
                $st_login = $this->session->userdata('statusLogin');
                $kategori = $this->session->userdata('kategori');
                $nama = $this->session->userdata('nama');
                if($st_login == 'yes'){
                ?>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $nama; ?> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Profil</a></li>
                      <li><a href="<?php echo site_url('permintaan-tumpangan') ?>">Permintaan Tumpangan</a></li>
                      <li><a href="#">Jalur Perjalanan</a></li>
                      <li><a href="#">Ganti Password</a></li>
                      <li><a href="<?php echo site_url('logout') ?>">Logout</a></li>
                    </ul>
                  </li>
                <?php
                }else{
                ?>
                <li><a href="#" data-toggle="modal" data-target="#loginModal">Login</a></li>
                <?php
                }
                ?>
                
              </ul>
            </div><!--/.nav-collapse -->
          </div>
        </div>
        
      </div>
    </div>